#include <iostream>
#include <cstring>

#define x first
#define y second

using namespace std;

typedef long long LL;
typedef pair<int, int> PII;

const int N = 25;

bool st[N][N];
LL f[N][N];

int dx[9] = {0, -2, -1, 1, 2, 2, 1, -1, -2};
int dy[9] = {0, 1, 2, 2, 1, -1, -2, -2, -1};

PII en, horse;

LL dfs(int x, int y)
{
	if (~f[x][y]) return f[x][y];
	
	LL &v = f[x][y];
	v = 0;
	
	if (x + 1 <= en.x && !st[x + 1][y]) v += dfs(x + 1, y);
	if (y + 1 <= en.y && !st[x][y + 1]) v += dfs(x, y + 1);
	
	return v;
}

void print()
{
	for (int i = 0; i <= en.x; i ++ )
	{
		for (int j = 0; j <= en.y; j ++ ) cout << f[i][j] << ' ';
		puts("");
	}
}

int main()
{
	cin >> en.x >> en.y >> horse.x >> horse.y;
	
	memset(f, -1, sizeof f);
	
	for (int i = 0; i < 9; i ++ ) 
	{
		int ax = dx[i] + horse.x, ay = dy[i] + horse.y;
		if (ax < 0 || ax > en.x || ay < 0 || ay > en.y) continue;
		st[ax][ay] = true;
	}
	
	
	
	f[en.x][en.y] = 1;
	
	cout << dfs(0, 0) << endl;
//	print();
	return 0;
}